<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="./js/vue.js"></script>
    <title>动态style属性实验</title>
</head>
<body>
    <div id="root">
        <div :style=" [obj1,obj2] " >实验数组写法样式是否合并</div>
        <div :style=" {width:'300px',height:'300px',background:'red'} " >直接试试对象写法</div>
    </div>

    <script>
        const vm = new Vue({
            data() {
                return {
                    obj1:{
                        width:'200px',
                        height:'200px'
                    },
                    obj2:{
                        background:'#3de'
                    }
                }
            },
        }).$mount('#root')
    </script>
</body>
</html>